package com.ushine.design.design.c_behavioral_pattern.b_command.c_queue;


import com.ushine.design.design.c_behavioral_pattern.b_command.b_example.Command;
import com.ushine.design.design.c_behavioral_pattern.b_command.b_example.ExitCommand;
import com.ushine.design.design.c_behavioral_pattern.b_command.b_example.HelpCommand;

/**
 * 命令队列测试
 *
 * @author yls
 */
public class Client {
    public static void main(String[] args) {
        CommandQueue commandQueue = new CommandQueue();
        Command command = new ExitCommand();
        commandQueue.addCommand(command);
        command = new HelpCommand();
        commandQueue.addCommand(command);

        Invoker invoker = new Invoker(commandQueue);
        invoker.call();
    }
}
